package com.gxsyh.nantie.user.management.provider.mapper;

import com.gxsyh.nantie.user.management.provider.domain.TbDepartment;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.MyMapper;

import java.util.List;

/**
 * @email yom535@outlook.com
 * @author: 刘锋嘉(Liu Fengjia)
 * @date: 2020/1/6
 * @time: 11:50
 * @Description: 
 */
public interface TbDepartmentMapper extends MyMapper<TbDepartment> {
    /**
     * 通过父级ID查询所有下级部门
     * @param parentId 父级ID
     * @return 所有下级部门
     */
    List<TbDepartment> selectSubsetDepartment(@Param("parentId")Long parentId);
    /**
     * 通过部门Id查询所有上级部门
     */
    List<TbDepartment> selectParentDepartment(@Param("parentId")Long parentId);
}